﻿package mortal.game.view.signUp.sevenDayLogin.panel
{
    import com.mui.controls.*;
    import mortal.common.swfPlayer.*;
    import mortal.common.swfPlayer.data.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.item.*;

    public class SevenDayGiftCell extends BaseItem
    {
        private var _effContainer:GSprite;
        protected var _effect:SWFPlayer;

        public function SevenDayGiftCell()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._effContainer = UIFactory.getUICompoment(GSprite, 0, 0, this);
            this._effect = UIFactory.getUICompoment(SWFPlayer);
            this._effect.timeRate = 5;
            this._effContainer.addChild(this._effect);
            var _loc_1:Boolean = false;
            this._effContainer.mouseEnabled = false;
            this._effContainer.mouseChildren = _loc_1;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._effContainer.visible = true;
            var _loc_2:int = 1;
            this._effContainer.scaleY = 1;
            this._effContainer.scaleX = _loc_2;
            this._effContainer.dispose(param1);
            this._effect.dispose(param1);
            this._effContainer = null;
            this._effect = null;
            super.disposeImpl(param1);
            return;
        }// end function

        override public function set itemData(param1:ItemData) : void
        {
            super.itemData = param1;
            if (itemData.itemInfo == null)
            {
                return;
            }
            this._effContainer.visible = true;
            if (itemData.itemInfo.color >= 4)
            {
                this._effContainer.x = 36;
                this._effContainer.y = 33;
                this._effect.load("ArriundEffect_cheng_big.swf", ModelType.NormalSwf, null);
            }
            else if (itemData.itemInfo.color == 3)
            {
                this._effContainer.x = 33;
                this._effContainer.y = 38;
                this._effect.load("ArriundEffect_zhi_big.swf", ModelType.NormalSwf, null);
            }
            else if (itemData.itemInfo.color == 2)
            {
                this._effContainer.x = -4;
                this._effContainer.y = 35;
                var _loc_2:Number = 1.7;
                this._effContainer.scaleY = 1.7;
                this._effContainer.scaleX = _loc_2;
                this._effect.load("ArroundEffect.swf", ModelType.NormalSwf, null);
            }
            else
            {
                this._effContainer.visible = false;
            }
            return;
        }// end function

    }
}
